<!--
    Author : Gisca
    Halaman untuk menambah data diri pengguna baru
-->
<link rel="stylesheet" type="text/css" href="<?php echo base_url(); ?>assets/style/template/css/general.css" />
<script type="text/javascript" src="<?php echo base_url(); ?>assets/style/template/js/generalUI.js"></script>
<?php if (isset($pesan))echo $pesan;?>
<head>
	<title>Tambah Pengguna</title>
</head>

<form method="post" name="formTambahPengguna" action="<?php echo site_url('ServerMengelolaDataPengguna/simpanTambahPengguna')?>">

<fieldset id="entryDataPengguna">
    <legend>&nbsp; Entry Data Pengguna</legend>
    <table>
        <tr>
            <td valign="top">
                <label for="username">User ID</label>
            </td>
            <td>
                <input type="text" name="username" id="username" onkeyup="validasiUsername(document.getElementById('username').value)" />
            </td>
            <td>
                <label id="validasiusername" class="validasi"></label>
                <input id="validasiusr" type="hidden" value=""/>
            </td>
        </tr>

        <tr>
            <td>
                <label for="name">Nama Lengkap</label>
            </td>
            <td>
                <input type="text" name="namePengguna" id="namePengguna" onkeyup="validasiNama(document.getElementById('namePengguna').value)" />
            </td>
            <td>
                <label id="validasinama" class="validasi"></label>
                <input id="validasinm" type="hidden" value=""/>
            </td>
        </tr>

         <tr>
            <td>
                <label for="password">Password</label>
            </td>
            <td>
                <input type="password" name="passwordPengguna" id="passwordPengguna" onkeyup="validasiPassword(document.getElementById('passwordPengguna').value)" />
            </td>
            <td>
                <label id="validasipassword" class="validasi"></label>
                <input id="validasipass" type="hidden" value=""/>
            </td>
        </tr>

        <tr>
            <td>
                <label for="password">Konfirmasi Password</label>
            </td>
            <td>
                <input type="password" name="passwordKonfirmasiPengguna" id="passwordKonfirmasiPengguna" onkeyup="validasiPasswordLagi(document.getElementById('passwordPengguna').value,document.getElementById('passwordKonfirmasiPengguna').value)" />
            </td>
            <td>
                <label id="validasipasswordlagi" class="validasi"></label>
                <input id="validasipasslagi" type="hidden" value=""/>
            </td>
        </tr>

        <tr>
            <td>
                <label for="email">Email</label>
            </td>
            <td>
                <input type="text" name="email" id="email" onkeyup="validasiEmail(document.getElementById('email').value)" />
            </td>
            <td>
                <label id="validasiemail" class="validasi"></label>
                <input id="validasimail" type="hidden" value=""/>
            </td>
        </tr>

        <tr>
            <td valign="top">
                <label for="gender">Jenis Kelamin</label>
            </td>
            <td>
                <input type="radio" name="gender" value="L" checked="checked" /> Laki-Laki <br />
                <input type="radio" name="gender" value="P" /> Perempuan
            </td>
        </tr>

        <tr>
            <td valign="top">
                <label for="address">Alamat</label>
            </td>
            <td>
                <textarea rows="3" cols="16" name="address" id="address" onkeyup="validasiAlamat(document.getElementById('address').value)"></textarea>
            </td>
            <td>
                <label id="validasialamat" class="validasi"></label>
                <input id="validasiaddr" type="hidden" value=""/>
            </td>
        </tr>

        <tr>
            <td>
                <label for="telp">Telepon</label>
            </td>
            <td>
                <input type="text" name="telp" id="telp" onkeyup="validasiNoTelp(document.getElementById('telp').value)" />
            </td>
            <td>
                <label id="validasinotelp" class="validasi"></label>
                <input id="validasitelp" type="hidden" value=""/>
            </td>
        </tr>
    </table>
    <!--<button type="button" id ="Cancel" onclick="<?php echo site_url('ServerMengelolaDataPengguna/DaftarPengguna')?>">Cancel</button>&nbsp;&nbsp;-->
    <a href="http://localhost/amelia/index.php/ServerMengelolaDataPengguna/DaftarPengguna"><strong>Back</strong></a>

    <button type="button" id ="Simpan" onclick="crosscheckTambah();">Tambah Pengguna</button>
</fieldset>
</form>
